
#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

enum EntityType {ENTITY_TANK, ENTITY_SPAWNPOINT, ENTITY_BULLET, ENTITY_ENEMY, ENTITY_TOWER};

class Entity
{
public:
	Entity(void) {referenceCount = 1;}
	virtual ~Entity(void)				= 0 {}
	virtual void Update(float dt)		= 0;
	virtual void Render(void)			= 0;
	virtual int  GetType(void) const	= 0;
	void AddReference(void)    {++referenceCount;}
	void RemoveReference(void) {--referenceCount; if (referenceCount == 0) delete this;}
	float		x;
	float		y;
	float		velocityX;
	float		velocityY;
	float		rotation;
	float		collisionRadius;
	int			textureID;
	bool		isAlive;
	EntityType	entityType;

private:
	int referenceCount;
};
